import {defineComponent} from 'vue'
import {get_img} from "@/serve";

export default defineComponent({
    name: 'single',
    // 数据
    data() {
        return {
            page: 1,
        }
    },

    // 传值
    props: ['currentSrc', 'paramImgList', 'paramPathList', 'paramRefreshing', 'paramFinished', 'paramLoading', 'paramPage'],

    // 组件
    components: {},

    // 计算
    computed: {
        src() {
            return this.currentSrc;
        },
        imagesList() {
            return this.paramImgList;
        },
        imagesPathList() {
            return this.paramPathList;
        },
        refreshing() {
            return this.paramRefreshing;
        },
        finished() {
            return this.paramFinished;
        },
        loading() {
            return this.paramLoading;
        },
    },
    // 监听
    watch: {},

    // 方法
    methods: {
        page_change(page: number) {
            this.$emit('page_change', page);
        }
    },

    // 生命周期
    created() {
        this.page = this.paramPage + 1;
    },
    mounted(): void {

    }
})